package com.cn.parks.dao;

import com.cn.parks.entity.UserCar;
import java.util.List;

public interface UserCarDao {
    // 添加用户车辆
    int insert(UserCar userCar) throws Exception;
    
    // 删除用户车辆
    int deleteById(Integer carId) throws Exception;
    
    // 更新用户车辆信息
    int update(UserCar userCar) throws Exception;
    
    // 根据ID查询车辆
    UserCar getById(Integer carId) throws Exception;

    //根据车辆ID修改车位编号
    int updateSeatNum(Integer carId, String seatNum) throws Exception;

    //根据车牌号查询车辆ID
    Integer getByCarId(String carNumber) throws Exception;
    
    // 查询所有用户车辆
    List<UserCar> getAll() throws Exception;

    //根据车位编号查询车辆是否存在
    UserCar getByCarNum(String seatNum) throws Exception;

    
    // 根据用户ID查询车辆
    List<UserCar> getByUserId(Integer userId) throws Exception;
    
    // 根据车牌号查询
    List<UserCar> getByCarNumber(String carNumber) throws Exception;

    //查询所有固定车辆个数
    int fixedCountAll() throws Exception;

    //查询所有VIP车辆个数
    int vipCountAll() throws Exception;

    //查询所有固定和VIP车辆
    List<UserCar> getAllCar() throws Exception;

    //查询今日增加的固定和VIP车辆个数
    int todayCount() throws Exception;
    
    // 更新车辆状态
    int updateStatus(Integer carId, Integer status) throws Exception;
} 